list1 = [1,2,3,2,3,1]
it = iter(list1)
while hash(it):
 try:
    print(next(it))
 except StopIteration:
     break
